//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima.pinda.authority.entity.auth;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.itheima.pinda.authority.enumeration.auth.Sex;
import com.itheima.pinda.vo.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;
import javax.validation.constraints.NotEmpty;
import org.hibernate.validator.constraints.Length;

@TableName("pd_auth_user")
@ApiModel(
        value = "User",
        description = "用户"
)
public class User extends Entity<Long> {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("账号")
    @NotEmpty(
            message = "账号不能为空"
    )
    @Length(
            max = 30,
            message = "账号长度不能超过30"
    )
    @TableField(
            value = "account",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String account;
    @ApiModelProperty("姓名")
    @NotEmpty(
            message = "姓名不能为空"
    )
    @Length(
            max = 50,
            message = "姓名长度不能超过50"
    )
    @TableField(
            value = "name",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String name;
    @ApiModelProperty("组织ID")
    @TableField("org_id")
    private Long orgId;
    @TableField(
            exist = false
    )
    private String orgName;
    @ApiModelProperty("岗位ID")
    @TableField("station_id")
    private Long stationId;
    @TableField(
            exist = false
    )
    private String stationName;
    @ApiModelProperty("邮箱")
    @Length(
            max = 255,
            message = "邮箱长度不能超过255"
    )
    @TableField(
            value = "email",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String email;
    @ApiModelProperty("手机")
    @Length(
            max = 20,
            message = "手机长度不能超过20"
    )
    @TableField(
            value = "mobile",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String mobile;
    @ApiModelProperty("性别")
    @TableField("sex")
    private Sex sex;
    @ApiModelProperty("启用状态 1启用 0禁用")
    @TableField("status")
    private Boolean status;
    @ApiModelProperty("头像")
    @Length(
            max = 255,
            message = "头像长度不能超过255"
    )
    @TableField(
            value = "avatar",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String avatar;
    @ApiModelProperty("工作描述")
    @Length(
            max = 255,
            message = "工作描述长度不能超过255"
    )
    @TableField(
            value = "work_describe",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String workDescribe;
    @ApiModelProperty("最后一次输错密码时间")
    @TableField("password_error_last_time")
    private LocalDateTime passwordErrorLastTime;
    @ApiModelProperty("密码错误次数")
    @TableField("password_error_num")
    private Integer passwordErrorNum;
    @ApiModelProperty("密码过期时间")
    @TableField("password_expire_time")
    private LocalDateTime passwordExpireTime;
    @ApiModelProperty("密码")
    @NotEmpty(
            message = "密码不能为空"
    )
    @Length(
            max = 64,
            message = "密码长度不能超过64"
    )
    @TableField(
            value = "password",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String password;
    @ApiModelProperty("最后登录时间")
    @TableField("last_login_time")
    private LocalDateTime lastLoginTime;

    public User(Long id, Long createUser, LocalDateTime createTime, Long updateUser, LocalDateTime updateTime, String account, String name, Long orgId, String orgName, Long stationId, String stationName, String email, String mobile, Sex sex, Boolean status, String avatar, String workDescribe, LocalDateTime passwordErrorLastTime, Integer passwordErrorNum, LocalDateTime passwordExpireTime, String password, LocalDateTime lastLoginTime) {
        this.id = id;
        this.createUser = createUser;
        this.createTime = createTime;
        this.updateUser = updateUser;
        this.updateTime = updateTime;
        this.account = account;
        this.name = name;
        this.orgId = orgId;
        this.orgName = orgName;
        this.stationId = stationId;
        this.stationName = stationName;
        this.email = email;
        this.mobile = mobile;
        this.sex = sex;
        this.status = status;
        this.avatar = avatar;
        this.workDescribe = workDescribe;
        this.passwordErrorLastTime = passwordErrorLastTime;
        this.passwordErrorNum = passwordErrorNum;
        this.passwordExpireTime = passwordExpireTime;
        this.password = password;
        this.lastLoginTime = lastLoginTime;
    }

    public static UserBuilder builder() {
        return new UserBuilder();
    }

    public String getAccount() {
        return this.account;
    }

    public String getName() {
        return this.name;
    }

    public Long getOrgId() {
        return this.orgId;
    }

    public String getOrgName() {
        return this.orgName;
    }

    public Long getStationId() {
        return this.stationId;
    }

    public String getStationName() {
        return this.stationName;
    }

    public String getEmail() {
        return this.email;
    }

    public String getMobile() {
        return this.mobile;
    }

    public Sex getSex() {
        return this.sex;
    }

    public Boolean getStatus() {
        return this.status;
    }

    public String getAvatar() {
        return this.avatar;
    }

    public String getWorkDescribe() {
        return this.workDescribe;
    }

    public LocalDateTime getPasswordErrorLastTime() {
        return this.passwordErrorLastTime;
    }

    public Integer getPasswordErrorNum() {
        return this.passwordErrorNum;
    }

    public LocalDateTime getPasswordExpireTime() {
        return this.passwordExpireTime;
    }

    public String getPassword() {
        return this.password;
    }

    public LocalDateTime getLastLoginTime() {
        return this.lastLoginTime;
    }

    public User setAccount(final String account) {
        this.account = account;
        return this;
    }

    public User setName(final String name) {
        this.name = name;
        return this;
    }

    public User setOrgId(final Long orgId) {
        this.orgId = orgId;
        return this;
    }

    public User setOrgName(final String orgName) {
        this.orgName = orgName;
        return this;
    }

    public User setStationId(final Long stationId) {
        this.stationId = stationId;
        return this;
    }

    public User setStationName(final String stationName) {
        this.stationName = stationName;
        return this;
    }

    public User setEmail(final String email) {
        this.email = email;
        return this;
    }

    public User setMobile(final String mobile) {
        this.mobile = mobile;
        return this;
    }

    public User setSex(final Sex sex) {
        this.sex = sex;
        return this;
    }

    public User setStatus(final Boolean status) {
        this.status = status;
        return this;
    }

    public User setAvatar(final String avatar) {
        this.avatar = avatar;
        return this;
    }

    public User setWorkDescribe(final String workDescribe) {
        this.workDescribe = workDescribe;
        return this;
    }

    public User setPasswordErrorLastTime(final LocalDateTime passwordErrorLastTime) {
        this.passwordErrorLastTime = passwordErrorLastTime;
        return this;
    }

    public User setPasswordErrorNum(final Integer passwordErrorNum) {
        this.passwordErrorNum = passwordErrorNum;
        return this;
    }

    public User setPasswordExpireTime(final LocalDateTime passwordExpireTime) {
        this.passwordExpireTime = passwordExpireTime;
        return this;
    }

    public User setPassword(final String password) {
        this.password = password;
        return this;
    }

    public User setLastLoginTime(final LocalDateTime lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
        return this;
    }

    public User() {
    }

    public User(final String account, final String name, final Long orgId, final String orgName, final Long stationId, final String stationName, final String email, final String mobile, final Sex sex, final Boolean status, final String avatar, final String workDescribe, final LocalDateTime passwordErrorLastTime, final Integer passwordErrorNum, final LocalDateTime passwordExpireTime, final String password, final LocalDateTime lastLoginTime) {
        this.account = account;
        this.name = name;
        this.orgId = orgId;
        this.orgName = orgName;
        this.stationId = stationId;
        this.stationName = stationName;
        this.email = email;
        this.mobile = mobile;
        this.sex = sex;
        this.status = status;
        this.avatar = avatar;
        this.workDescribe = workDescribe;
        this.passwordErrorLastTime = passwordErrorLastTime;
        this.passwordErrorNum = passwordErrorNum;
        this.passwordExpireTime = passwordExpireTime;
        this.password = password;
        this.lastLoginTime = lastLoginTime;
    }

    public String toString() {
        return "User(super=" + super.toString() + ", account=" + this.getAccount() + ", name=" + this.getName() + ", orgId=" + this.getOrgId() + ", orgName=" + this.getOrgName() + ", stationId=" + this.getStationId() + ", stationName=" + this.getStationName() + ", email=" + this.getEmail() + ", mobile=" + this.getMobile() + ", sex=" + this.getSex() + ", status=" + this.getStatus() + ", avatar=" + this.getAvatar() + ", workDescribe=" + this.getWorkDescribe() + ", passwordErrorLastTime=" + this.getPasswordErrorLastTime() + ", passwordErrorNum=" + this.getPasswordErrorNum() + ", passwordExpireTime=" + this.getPasswordExpireTime() + ", password=" + this.getPassword() + ", lastLoginTime=" + this.getLastLoginTime() + ")";
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof User)) {
            return false;
        } else {
            User other = (User)o;
            if (!other.canEqual(this)) {
                return false;
            } else if (!super.equals(o)) {
                return false;
            } else {
                label217: {
                    Object this$account = this.getAccount();
                    Object other$account = other.getAccount();
                    if (this$account == null) {
                        if (other$account == null) {
                            break label217;
                        }
                    } else if (this$account.equals(other$account)) {
                        break label217;
                    }

                    return false;
                }

                Object this$name = this.getName();
                Object other$name = other.getName();
                if (this$name == null) {
                    if (other$name != null) {
                        return false;
                    }
                } else if (!this$name.equals(other$name)) {
                    return false;
                }

                label203: {
                    Object this$orgId = this.getOrgId();
                    Object other$orgId = other.getOrgId();
                    if (this$orgId == null) {
                        if (other$orgId == null) {
                            break label203;
                        }
                    } else if (this$orgId.equals(other$orgId)) {
                        break label203;
                    }

                    return false;
                }

                Object this$orgName = this.getOrgName();
                Object other$orgName = other.getOrgName();
                if (this$orgName == null) {
                    if (other$orgName != null) {
                        return false;
                    }
                } else if (!this$orgName.equals(other$orgName)) {
                    return false;
                }

                Object this$stationId = this.getStationId();
                Object other$stationId = other.getStationId();
                if (this$stationId == null) {
                    if (other$stationId != null) {
                        return false;
                    }
                } else if (!this$stationId.equals(other$stationId)) {
                    return false;
                }

                label182: {
                    Object this$stationName = this.getStationName();
                    Object other$stationName = other.getStationName();
                    if (this$stationName == null) {
                        if (other$stationName == null) {
                            break label182;
                        }
                    } else if (this$stationName.equals(other$stationName)) {
                        break label182;
                    }

                    return false;
                }

                label175: {
                    Object this$email = this.getEmail();
                    Object other$email = other.getEmail();
                    if (this$email == null) {
                        if (other$email == null) {
                            break label175;
                        }
                    } else if (this$email.equals(other$email)) {
                        break label175;
                    }

                    return false;
                }

                Object this$mobile = this.getMobile();
                Object other$mobile = other.getMobile();
                if (this$mobile == null) {
                    if (other$mobile != null) {
                        return false;
                    }
                } else if (!this$mobile.equals(other$mobile)) {
                    return false;
                }

                Object this$sex = this.getSex();
                Object other$sex = other.getSex();
                if (this$sex == null) {
                    if (other$sex != null) {
                        return false;
                    }
                } else if (!this$sex.equals(other$sex)) {
                    return false;
                }

                label154: {
                    Object this$status = this.getStatus();
                    Object other$status = other.getStatus();
                    if (this$status == null) {
                        if (other$status == null) {
                            break label154;
                        }
                    } else if (this$status.equals(other$status)) {
                        break label154;
                    }

                    return false;
                }

                label147: {
                    Object this$avatar = this.getAvatar();
                    Object other$avatar = other.getAvatar();
                    if (this$avatar == null) {
                        if (other$avatar == null) {
                            break label147;
                        }
                    } else if (this$avatar.equals(other$avatar)) {
                        break label147;
                    }

                    return false;
                }

                Object this$workDescribe = this.getWorkDescribe();
                Object other$workDescribe = other.getWorkDescribe();
                if (this$workDescribe == null) {
                    if (other$workDescribe != null) {
                        return false;
                    }
                } else if (!this$workDescribe.equals(other$workDescribe)) {
                    return false;
                }

                Object this$passwordErrorLastTime = this.getPasswordErrorLastTime();
                Object other$passwordErrorLastTime = other.getPasswordErrorLastTime();
                if (this$passwordErrorLastTime == null) {
                    if (other$passwordErrorLastTime != null) {
                        return false;
                    }
                } else if (!this$passwordErrorLastTime.equals(other$passwordErrorLastTime)) {
                    return false;
                }

                label126: {
                    Object this$passwordErrorNum = this.getPasswordErrorNum();
                    Object other$passwordErrorNum = other.getPasswordErrorNum();
                    if (this$passwordErrorNum == null) {
                        if (other$passwordErrorNum == null) {
                            break label126;
                        }
                    } else if (this$passwordErrorNum.equals(other$passwordErrorNum)) {
                        break label126;
                    }

                    return false;
                }

                label119: {
                    Object this$passwordExpireTime = this.getPasswordExpireTime();
                    Object other$passwordExpireTime = other.getPasswordExpireTime();
                    if (this$passwordExpireTime == null) {
                        if (other$passwordExpireTime == null) {
                            break label119;
                        }
                    } else if (this$passwordExpireTime.equals(other$passwordExpireTime)) {
                        break label119;
                    }

                    return false;
                }

                Object this$password = this.getPassword();
                Object other$password = other.getPassword();
                if (this$password == null) {
                    if (other$password != null) {
                        return false;
                    }
                } else if (!this$password.equals(other$password)) {
                    return false;
                }

                Object this$lastLoginTime = this.getLastLoginTime();
                Object other$lastLoginTime = other.getLastLoginTime();
                if (this$lastLoginTime == null) {
                    if (other$lastLoginTime != null) {
                        return false;
                    }
                } else if (!this$lastLoginTime.equals(other$lastLoginTime)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof User;
    }

    public int hashCode() {
        Boolean PRIME = true;
        int result = super.hashCode();
        Object $account = this.getAccount();
        result = result * 59 + ($account == null ? 43 : $account.hashCode());
        Object $name = this.getName();
        result = result * 59 + ($name == null ? 43 : $name.hashCode());
        Object $orgId = this.getOrgId();
        result = result * 59 + ($orgId == null ? 43 : $orgId.hashCode());
        Object $orgName = this.getOrgName();
        result = result * 59 + ($orgName == null ? 43 : $orgName.hashCode());
        Object $stationId = this.getStationId();
        result = result * 59 + ($stationId == null ? 43 : $stationId.hashCode());
        Object $stationName = this.getStationName();
        result = result * 59 + ($stationName == null ? 43 : $stationName.hashCode());
        Object $email = this.getEmail();
        result = result * 59 + ($email == null ? 43 : $email.hashCode());
        Object $mobile = this.getMobile();
        result = result * 59 + ($mobile == null ? 43 : $mobile.hashCode());
        Object $sex = this.getSex();
        result = result * 59 + ($sex == null ? 43 : $sex.hashCode());
        Object $status = this.getStatus();
        result = result * 59 + ($status == null ? 43 : $status.hashCode());
        Object $avatar = this.getAvatar();
        result = result * 59 + ($avatar == null ? 43 : $avatar.hashCode());
        Object $workDescribe = this.getWorkDescribe();
        result = result * 59 + ($workDescribe == null ? 43 : $workDescribe.hashCode());
        Object $passwordErrorLastTime = this.getPasswordErrorLastTime();
        result = result * 59 + ($passwordErrorLastTime == null ? 43 : $passwordErrorLastTime.hashCode());
        Object $passwordErrorNum = this.getPasswordErrorNum();
        result = result * 59 + ($passwordErrorNum == null ? 43 : $passwordErrorNum.hashCode());
        Object $passwordExpireTime = this.getPasswordExpireTime();
        result = result * 59 + ($passwordExpireTime == null ? 43 : $passwordExpireTime.hashCode());
        Object $password = this.getPassword();
        result = result * 59 + ($password == null ? 43 : $password.hashCode());
        Object $lastLoginTime = this.getLastLoginTime();
        result = result * 59 + ($lastLoginTime == null ? 43 : $lastLoginTime.hashCode());
        return result;
    }

    public static class UserBuilder {
        private Long id;
        private Long createUser;
        private LocalDateTime createTime;
        private Long updateUser;
        private LocalDateTime updateTime;
        private String account;
        private String name;
        private Long orgId;
        private String orgName;
        private Long stationId;
        private String stationName;
        private String email;
        private String mobile;
        private Sex sex;
        private Boolean status;
        private String avatar;
        private String workDescribe;
        private LocalDateTime passwordErrorLastTime;
        private Integer passwordErrorNum;
        private LocalDateTime passwordExpireTime;
        private String password;
        private LocalDateTime lastLoginTime;

        UserBuilder() {
        }

        public UserBuilder id(final Long id) {
            this.id = id;
            return this;
        }

        public UserBuilder createUser(final Long createUser) {
            this.createUser = createUser;
            return this;
        }

        public UserBuilder createTime(final LocalDateTime createTime) {
            this.createTime = createTime;
            return this;
        }

        public UserBuilder updateUser(final Long updateUser) {
            this.updateUser = updateUser;
            return this;
        }

        public UserBuilder updateTime(final LocalDateTime updateTime) {
            this.updateTime = updateTime;
            return this;
        }

        public UserBuilder account(final String account) {
            this.account = account;
            return this;
        }

        public UserBuilder name(final String name) {
            this.name = name;
            return this;
        }

        public UserBuilder orgId(final Long orgId) {
            this.orgId = orgId;
            return this;
        }

        public UserBuilder orgName(final String orgName) {
            this.orgName = orgName;
            return this;
        }

        public UserBuilder stationId(final Long stationId) {
            this.stationId = stationId;
            return this;
        }

        public UserBuilder stationName(final String stationName) {
            this.stationName = stationName;
            return this;
        }

        public UserBuilder email(final String email) {
            this.email = email;
            return this;
        }

        public UserBuilder mobile(final String mobile) {
            this.mobile = mobile;
            return this;
        }

        public UserBuilder sex(final Sex sex) {
            this.sex = sex;
            return this;
        }

        public UserBuilder status(final Boolean status) {
            this.status = status;
            return this;
        }

        public UserBuilder avatar(final String avatar) {
            this.avatar = avatar;
            return this;
        }

        public UserBuilder workDescribe(final String workDescribe) {
            this.workDescribe = workDescribe;
            return this;
        }

        public UserBuilder passwordErrorLastTime(final LocalDateTime passwordErrorLastTime) {
            this.passwordErrorLastTime = passwordErrorLastTime;
            return this;
        }

        public UserBuilder passwordErrorNum(final Integer passwordErrorNum) {
            this.passwordErrorNum = passwordErrorNum;
            return this;
        }

        public UserBuilder passwordExpireTime(final LocalDateTime passwordExpireTime) {
            this.passwordExpireTime = passwordExpireTime;
            return this;
        }

        public UserBuilder password(final String password) {
            this.password = password;
            return this;
        }

        public UserBuilder lastLoginTime(final LocalDateTime lastLoginTime) {
            this.lastLoginTime = lastLoginTime;
            return this;
        }

        public User build() {
            return new User(this.id, this.createUser, this.createTime, this.updateUser, this.updateTime, this.account, this.name, this.orgId, this.orgName, this.stationId, this.stationName, this.email, this.mobile, this.sex, this.status, this.avatar, this.workDescribe, this.passwordErrorLastTime, this.passwordErrorNum, this.passwordExpireTime, this.password, this.lastLoginTime);
        }

        public String toString() {
            return "User.UserBuilder(id=" + this.id + ", createUser=" + this.createUser + ", createTime=" + this.createTime + ", updateUser=" + this.updateUser + ", updateTime=" + this.updateTime + ", account=" + this.account + ", name=" + this.name + ", orgId=" + this.orgId + ", orgName=" + this.orgName + ", stationId=" + this.stationId + ", stationName=" + this.stationName + ", email=" + this.email + ", mobile=" + this.mobile + ", sex=" + this.sex + ", status=" + this.status + ", avatar=" + this.avatar + ", workDescribe=" + this.workDescribe + ", passwordErrorLastTime=" + this.passwordErrorLastTime + ", passwordErrorNum=" + this.passwordErrorNum + ", passwordExpireTime=" + this.passwordExpireTime + ", password=" + this.password + ", lastLoginTime=" + this.lastLoginTime + ")";
        }
    }
}
